NIELIT O Level Exam

Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.reverse()?

Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.reverse()?

मान लीजिए कि list1 [3, 4, 5, 20, 5, 25, 1, 3] है, list1.reverse () के बाद list1 क्या है?

A. [3, 4, 5, 20, 5, 25, 1, 3]

B. [1, 3, 3, 4, 5, 5, 20, 25]

C. [25, 20, 5, 5, 4, 3, 3, 1]

D. [3, 1, 25, 5, 20, 5, 4, 3]




Correct Answer is :

D. [3, 1, 25, 5, 20, 5, 4, 3]



Explanation

reverse function reverse the list i.e. the value of last index moves to first and last second value moves to second index and so on.

so the list after reverse is : [3, 1, 25, 5, 20, 5, 4, 3]

CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad